var status = -1;
var selectionLog = [];

function action(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.curNodeEventEnd(true);
            cm.setInGameDirectionMode(true, false, true);
            cm.inGameDirectionEvent_SetHideEffect(1);
            cm.inGameDirectionEvent_PushMoveInfo(0, 400, 457, -4567);
            cm.curNodeEventEnd(true)
        } else {
            if (status === a++) {
                cm.setAmbience("Ambience.img/secretmissionbase", 100, 60);
                cm.inGameDirectionEvent_AskAnswerTime(3000);
                cm.effect_Voice("SoundEff.img/blackHeaven/secretmission1", 100)
            } else {
                if (status === a++) {
                    cm.fieldEffect_InsertCanvas(1, 255, 0, 0, 0, 500, 0);
                    cm.inGameDirectionEvent_AskAnswerTime(500)
                } else {
                    if (status === a++) {
                        cm.dispose();
                        cm.warp(350011020, 0, true)
                    }
                }
            }
        }
    }
}

function start() {
    status = -1;
    action(1, 0, 0)
};